home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Club 2000 October / Software of the Month - Ultimate Collection Shareware 277.iso / pc / PROGRAMS / UTILITY / WINLINUX / DATA1.CAB / programs_-_usrdoc / XLOCKMOR.{2Q / README.{__ < prev    next >
Text File  |  1999-09-17  |  35KB  |  791 lines

  1. xlockmore-4.12: the maintained version of xlock
  2. see docs/Revisions for more version stuff
  3. see docs/TODO for stuff to do :)
  4.  
  5. I have significantly less time to maintain this but I try.
  6. If someone has some free time and wants to take over... let me know.
  7. (Help is always appreciated too ;) ).
  8.  
  9. Primary site: ftp://ftp.tux.org/pub/people/david-bagley/xlockmore
  10. Secondary site: ftp://ftp.x.org/contrib/applications
  11. Web page: http://www.tux.org/~bagleyd/xlockmore.html
  12. Maintainer: David A. Bagley <bagleyd@bigfoot.com>
  13.  
  14. Majordomos: Mail to majordomo@tux.org with just
  15. subscribe [choice] [your-email-address]
  16.   in the body.
  17.     choice                  brief description
  18.     ------                  -----------------
  19.     xlock-beta              Xlock beta and production announcements
  20.     xlock-alpha             Xlock alpha ("daily") release announcements
  21.     xlock                   Xlock/Xlockmore development discussion
  22.   If there is trailing signature junk, just put "end" as the last line to
  23.   be read.  If you need help just put "help" in the body.
  24.  
  25. SECURITY WARNING:
  26. -----------------
  27. xlock using the MesaGL Libraries (<= 2.6) setuid root has a known method for
  28. users to obtain root privledges!
  29.  
  30. Please send all bug reports to bagleyd@bigfoot.com .
  31. Alpha versions may be available through web page or primary ftp site.
  32. Adapted from Patrick J. Naughton's original xlock, with lots of help
  33.  from others.
  34.  
  35.  
  36. How to build?
  37. -------------
  38.   An ANSI C compiler is required for build.
  39.   motif (and editres) are used to build xmlock and are not used in xlock.
  40.   athena and sxlib are used to build xalock and are not used in xlock.
  41.  
  42.   Check below to see if your machine is one mentioned that causes
  43.   problems, otherwise it should be easy.  Just to be safe after installing 
  44.   test it with something like: `/usr/local/bin/xlock -debug -verbose`
  45.  
  46.   There are 3 ways to build:
  47.  
  48.   configure:
  49.     `configure --help` to see options.
  50.  
  51.         configure ; make ; make install
  52.  
  53.         For Linux and others you may want something like:
  54.     configure --prefix=/usr/X11R6 ; make ; make install
  55.     that way it will install it in /usr/X11R6 not /usr/local
  56.         For Suns you may want:
  57.     configure --prefix=/usr/openwin ; make ; make install
  58.  
  59.   imake:
  60.     Sometimes this is not setup correctly by the distributer ... i.e. not
  61.     my fault.  You may want to do these quick edits to the iconfig.h so you
  62.     have more capabilities:
  63.  
  64.     Do you have XPM?              If so, uncomment "#define XpmLibrary".
  65.     Do you have OpenGL or MesaGL? If so, uncomment "#define GLLibrary".
  66.     Do you have CDE?              If so, uncomment "#define DtSaverLibrary".
  67.     Do you have RPLAY?            If so, uncomment "#define RplayLibrary".
  68.     Do you have NAS?              If so, uncomment "#define NasLibrary".
  69.     Do you have Motif?            If so, uncomment "#define XmLibrary".
  70.  
  71.     Examine iconfig.h for other optional capabilities.
  72.  
  73.     xmkmf ; make Makefiles ; make depend ; make ; make install
  74.     or
  75.     xmkmf -a ; make ; make install
  76.  
  77.   make.com:
  78.     See VMS below.
  79.  
  80.  
  81. Note to binary redistributers:
  82. -----------------------------
  83.   Probably should not distribute with any library requirements
  84.   (except possibly XPM, unless you statically link them in
  85.   and with USE_BOMB since it might not run right if you do not know
  86.   if your users will use xdm or not.  For example:
  87.     configure --without-xpm --without-opengl --without-mesagl
  88.       --without-dtsaver --without-rplay --without-nas --disable-bomb; make
  89.   You may want to distribute it with the xlock/XLock.ad file with "XLock."
  90.   instances replaced with "*".  On Sun's, I need it to override the system
  91.   XLock.ad  file.
  92.   Please let me know if there are other concerns.
  93.  
  94.  
  95. Likely Problems
  96. ---------------
  97.   Make sure you use the new XLock.ad resource file (or at least remove the
  98.     old one) otherwise several modes will not be set up nicely.  This is
  99.     usually put as a file in $HOME/XLock and/or
  100.     $WHEREVER_X11_IS_LOADED/lib/X11/app-defaults/XLock .
  101.  
  102.   "Key: " this usually means you should get your administrator to setuid
  103.     xlock to root or at least setgid xlock to shadow.  If you do not have
  104.     a friendly administrator it is asking for a key (password) that it will
  105.     save encrypted your $HOME/.xlockrc file.
  106.  
  107.   AIX (IBM RS6000)
  108.     AIX's "make":
  109.       AIX's "make" can not handle "+=" so if you use the iconfig.h, you
  110.       have to group all your DEFINES into one long line and use "="
  111.       instead.  GNU's "make" solves this problem.
  112.     AIX 3.1 and less:
  113.       it SHOULD compile automatically with -DLESS_THAN_AIX3_2 using the
  114.       iconfig.h, since the passwd struct is not available.
  115.     AIX 3.2 and greater:
  116.       one must have setuid xlock to root if you want to use it
  117.       without being root.
  118.        su - root
  119.        chown root xlock
  120.        chmod u+s xlock
  121.        chmod og+rx xlock
  122.     AFS users:
  123.       See iconfig.h, grep on "AFS". 
  124.     Some machines have an alternate password shadowing method, if someone  
  125.       figures it out mail me the patch.
  126.     AIX with DCE you will need "-ls" among the XLOCKLIBS.
  127.  
  128.   Alpha-OSF/1 (Digital Equipment Corp)
  129.  
  130.     Enhanced security:
  131.       Compile with -DOSF1_ENH_SEC see iconfig.h
  132.         chown auth.auth xlock
  133.         chmod 2755 xlock
  134.       Unfortunately the following is reportedly broken since xlockmore-2.10
  135.       and needs a patch, I heard it produces the following at runtime.
  136. Unaligned access pid=1767 <xlock> va=140489e24 pc=3ff807d9978 ra=3ff807d9880
  137. type=ldq
  138. Segmentation fault (core dumped)
  139.  
  140.   Apollo (HP)
  141.     Shift-Control-Break is caught.  See HP.
  142.  
  143.   CDE (DT) Common Desktop Environment.
  144.     Go to the CDE DT CONFIG SECTION of the
  145.      iconfig.h and uncomment (should be autodetected if you use configure)
  146. XCOMM #define DtSaverLibrary
  147.     Here's what it does:
  148.       The DT screensaver is part of the dtwm window manager and what it does
  149.       is create a full-screen-sized window for each screen of your display.
  150.       This is different from other screen savers which use virtual roots.
  151.  
  152.       What the DTSAVER option does is basically call a DT routine that
  153.       returns the id's of the windows it creates for the screensaver.  Then
  154.       xlockmore will use these windows to display its stuff.
  155.  
  156.       DT has a program where you can select your screensaver modes (or
  157.       screen saver programs), ala xmlock, and set your screensaver settings.
  158.       It also creates a small window where if you select a particular mode
  159.       it will run the screen saver and display it on that small window.
  160.  
  161.     Here's how to set it up on your home directory.
  162.       cp etc/dtprofile $HOME/.dtprofile
  163.         This uses a ksh syntax.  If your shell is csh or other change it
  164.         accordingly.
  165.       cp etc/dtscreen.dt $HOME/.dt/types
  166.         The actions points to /usr/remote so you may want to change this.
  167.       After this you need to completely logout from your CDE session and log 
  168.       back in so it will read the .dtprofile.  (If you just modify the actions
  169.       in dtscreen.dt you don't need to log out; you can simply restart your
  170.       dtwm.)
  171.     Here's how to set it up on your system.
  172.       edit /usr/dt/bin/Xsession DTSCREENSAVERLIST to contain the
  173.         DTSCREENSAVERLIST stuff in etc/dtprofile
  174.       cp etc/dtscreen.dt /usr/dt/appconfig/types/C/dtscreen.dt
  175.  
  176.     The disadvantage to the above is some features of xlock are abscent,
  177.       in particular, the logout lab feature.  This version of xlock does not
  178.       hava a drop in replacement for the Screen Style Manager.  Here is a
  179.       work around on Solaris in 3 patches:
  180.       1. Take out Screen option.
  181.       2. Put in /usr/local/bin/xlock as the default locker.
  182.       3. Turn off the default DT locking mechanism.
  183. *** /usr/dt/app-defaults/C/Dtstyle.orig    Fri Apr 12 11:53:00 1996
  184. --- /usr/dt/app-defaults/C/Dtstyle    Thu Jul 24 09:47:34 1997
  185. ***************
  186. *** 24,30 ****
  187.   !#   Do not translate the following
  188.   !###
  189.   !# componentList specifies the buttons that appear in the Style Manager.
  190. ! Dtstyle*componentList:  Color Font Backdrop Keyboard Mouse Beep Screen Dtwm Startup
  191.   
  192.   !# The Style Manager may be oriented vertically by commenting out this line
  193.   Dtstyle*mainRC.orientation:         HORIZONTAL
  194. --- 24,31 ----
  195.   !#   Do not translate the following
  196.   !###
  197.   !# componentList specifies the buttons that appear in the Style Manager.
  198. ! !#Dtstyle*componentList:  Color Font Backdrop Keyboard Mouse Beep Screen Dtwm Startup
  199. ! Dtstyle*componentList:  Color Font Backdrop Keyboard Mouse Beep Dtwm Startup
  200.   
  201.   !# The Style Manager may be oriented vertically by commenting out this line
  202.   Dtstyle*mainRC.orientation:         HORIZONTAL
  203. *** /usr/dt/appconfig/types/C/dt.dt.orig    Fri Apr 12 11:53:28 1996
  204. --- /usr/dt/appconfig/types/C/dt.dt    Thu Jul 24 11:32:21 1997
  205. ***************
  206. *** 226,235 ****
  207.   ACTION LockDisplay
  208.   {
  209.       LABEL        LockDisplay
  210. !         TYPE            TT_MSG
  211. !         TT_CLASS    TT_REQUEST
  212. !         TT_SCOPE    TT_SESSION
  213. !         TT_OPERATION    Display_Lock
  214.           DESCRIPTION     The LockDisplay action locks the workstation. \
  215.                           You must know the user's or root password to \
  216.                           unlock the workstation.
  217. --- 226,239 ----
  218.   ACTION LockDisplay
  219.   {
  220.       LABEL        LockDisplay
  221. ! #        TYPE            TT_MSG
  222. ! #        TT_CLASS    TT_REQUEST
  223. ! #        TT_SCOPE    TT_SESSION
  224. ! #        TT_OPERATION    Display_Lock
  225. !         TYPE            COMMAND
  226. !         ARG_COUNT    0
  227. !         WINDOW_TYPE    NO_STDIO
  228. !         EXEC_STRING    /usr/local/bin/xlock
  229.           DESCRIPTION     The LockDisplay action locks the workstation. \
  230.                           You must know the user's or root password to \
  231.                           unlock the workstation.
  232. *** /usr/dt/config/C/sys.resources.orig    Fri Apr 12 11:53:15 1996
  233. --- /usr/dt/config/C/sys.resources    Thu Jul 24 11:33:57 1997
  234. ***************
  235. *** 82,88 ****
  236.   
  237.   
  238.   dtsession*saverTimeout:  10 
  239. ! dtsession*lockTimeout:   30
  240.   dtsession*cycleTimeout:  3 
  241.   dtsession*saverList: StartDtscreenBlank
  242.   
  243. --- 82,89 ----
  244.   
  245.   
  246.   dtsession*saverTimeout:  10 
  247. ! !#dtsession*lockTimeout:   30
  248. ! dtsession*lockTimeout:   0
  249.   dtsession*cycleTimeout:  3 
  250.   dtsession*saverList: StartDtscreenBlank
  251.   
  252.  
  253.   DCE authentication (tested only on HP's)
  254.     See iconfig.h (xmkmf) or modes/Makefile.in (configure).
  255.  
  256.   Digital Unix
  257.     Reported that 3.2D (8bpp) password screen color map gets messed up
  258.     sometimes when in random mode as it switches from one mode to another.
  259.     
  260.   ESIX
  261.     Similar to Solaris2.x.  You will need a -DSVR4 to compile.
  262.     chmod 440 /etc/shadow
  263.     if you get libX11.so.xxx not found
  264.       link with the static versions of the X libraries 
  265.     chmod 2755 xlock
  266.  
  267.   FreeBSD
  268.     One may have to setuid xlock to root (are there any objections?).
  269.     Also see "XFree86" if applicable.
  270.  
  271.   HP
  272.     Shift-Control-Break is caught.  This uses a library Xhp11 that may
  273.       not exist on some systems.  Comment out
  274.         XHPDisableReset(dsp);
  275.       and
  276.         XHPEnableReset(dsp);
  277.       in "xlock.c" if you do not have this library.
  278.       May have to setuid xlock to root.
  279.     The optimizer may break in xlock/ .
  280.     HP's "make":
  281.       HP's "make" can not handle "+=" so if you use the iconfig.h, you
  282.       have to group all your DEFINES into one long line and use "="
  283.       instead.  GNU's "make" solves this problem.
  284.     HP-UX with Secured Passwords:
  285.       Compile with -DHPUX_SECURE_PASSWD and setuid xlock to root.
  286.     HP-UX with Passwd Etc:
  287.       Compile with -DHP_PASSWDETC .
  288.       Link with -lrgy -lnck -lndbm .
  289.     Calls to XSetScreenSaver when using CDE (i.e. not called with -dtsaver)
  290.       is not supported.  This can cause a disruption in the rpc ttdbserver
  291.       system resulting in the CDE lock and exit buttons to fail, 5 to 50%
  292.       of the time.  I am told this will not be fixed by HP, only documented.
  293.       The only supported method of doing this stuff is via dtstyle.
  294.  
  295.   IRIX (SGI)
  296.     OpenGL works but may be a little flaky.
  297.  
  298.   KERBEROS
  299.     See iconfig.h (xmkmf) or modes/Makefile.in (configure).
  300.     
  301.   Linux (Intel 80386, 80486, & Pentium)
  302.     If you are using elf _or_ shadow passwords:
  303.       xlock should compile with -DHAVE_SHADOW
  304.       this is already forced if you have elf so do not worry, it should
  305.       work even if you do not have shadow passwording.
  306.     If you are _not_ using elf and are using shadow passwords:
  307.       (this old version of shadowing has a _MAJOR_ known security flaw)
  308.       link with -lshadow -lgdbm
  309.     Next if using shadow passwords:
  310.       chown root.root xlock  (or root.shadow if it exists)
  311.       chmod 4755 xlock
  312.       (chmod 2755 xlock may be better if shadow has group read for root group)
  313.       Also check that the following was done:
  314.         Your /usr/X11R6/lib/X11/config/linux.cf should have
  315. #define HasShadowPasswd         YES
  316.           This would let the iconfig.h work automatically for compile/link.
  317.         chown root.root /etc/shadow   (or root.shadow if it exists)
  318.         chmod 400 /etc/shadow
  319.         (chmod 440 /etc/shadow may be better).
  320.     So far, Slackware (a major Linux distribution) does NOT come with shadow
  321.       passwords standard.  If you want to install shadow passwords (be
  322.       careful, it can be tricky) it's on sunsite.unc.edu in
  323.       /pub/Linux/system/Admin .
  324.     Also see "XFree86" if applicable.
  325.  
  326.   Linux (Alpha)
  327.     Change the order of XLIB and XPMLIB in the iconfig.h so the XPMLIB
  328.      comes first.  Intel stuff above probably applies as well.
  329.  
  330.   MesaGL and OpenGL
  331.     I assume the Mesa 3-D Graphics Library for the Imakefile.  See below
  332.       on availability.  Follow its instructions and then go to MesaGL
  333.       section of the iconfig.h and uncomment
  334. XCOMM #define GLLibrary
  335.       MesaGL and sometimes OpenGL are autodetected if you use configure.
  336.  
  337.   Rplay
  338.     Audio package.  See below on availability.  Follow its instructions and
  339.       then go to iconfig.h and uncomment (should be autodetected if you use
  340.       configure)
  341. XCOMM #define RplayLibrary
  342.       See config directory for example.  (Note: The example files are
  343.       concerned with getting it working ... not security).
  344.  
  345.   Solaris2.x (Sun SPARC)
  346.     Solaris2.6 may not work with rplay.  configure --without-rplay
  347.     If you get something like:
  348. xlock.c:1584: `sigset_t' undeclared (first use this function)
  349.       try removing -I/usr/include from the Makefiles or get rid of -Xc
  350.       in the xlock/Makefile.  If someone figures out a way around this
  351.       in the code let me know.
  352.     To get xlock working with Sun's GL libraries and includes
  353.       If you get "macro `glNormal3f' used with just one arg" ... you need
  354.          -DSUN_OGL_NO_VERTEX_MACROS
  355.       If using Imakefile, see iconfig.h .
  356.       After a make, use on a display that supports GLX  `xdpyinfo | grep GLX`
  357.     It is possible to get xlock working with Sun's OpenGL libraries
  358.       and MesaGL's includes (I could not find Sun's OpenGL includes, so you
  359.       probably have to pay extra for them).
  360.       1. configure --without-opengl --with-mesagl --x-includes=/usr/openwin \
  361.             --x-libraries=/usr/openwin <+your options>
  362.       2. edit the modes/Makefile
  363.         Take out "Mesa" from the library stuff.
  364.       3. edit config.h
  365.         uncomment "#define OPENGL_MESA_INCLUDES"
  366.       4. make
  367.       5. Use on a display that supports GLX  `xdpyinfo | grep GLX`
  368.     Imake will compile with the -DHAVE_SHADOW switch.
  369.     With GNU's gcc, get rid of the "-ansi" during compilation, also
  370.       one may want to get rid of the -xF references in
  371.       /usr/openwin/lib/config/sun.cf and Imake.tmpl if you get a
  372.       cc: language F not recognized
  373.     Solaris2.x NIS+ or not using NIS (/etc/passwd):
  374.       If you use netgroup make sure there is a return at the end of file.
  375.  
  376.   SunOS4.1.x (Sun Sparc & 680x0)
  377.     bubble will crash the xnews server if patch 100444-76 OpenWindows V3.0
  378.       Server patch is installed.  To test this
  379.       `strings /usr/openwin/bin/xnews | grep Patch`
  380.       It would then show Patch #3000-124 if 10044-76 is installed.
  381.     Put in a link from /usr/include/X11 to your ${OPENWINHOME}/include/X11
  382.       to use the xmkmf or use the configure file provided.
  383.     gcc -Wall gives a lot of silly warnings, its safe to disregard them.
  384.  
  385.   Ultrix (DEC)
  386.     I heard that the logout button just kills xlock.
  387.     USE_XLOCKRC feature unimplemented, but may not be hard to do.
  388.     xlock must be either setuid root or setgid authread to validate the
  389.       password on an Ultrix system.
  390.  
  391.   VMS (DEC)
  392.     You may want to set a few things like vroot, bomb, and sound (see audio
  393.       below) at the top of the file.
  394.     All you should need to do to build the executable is:
  395.         $ @make
  396.     To run xlock a symbol needs to be defined, for example:
  397.         XLOCK:==$H268SYSEXE:XLOCK
  398.       where H268SYSEXE is a logical name pointing to the directory where
  399.       XLOCK.EXE resides. The '$' after == means this is a foreign command
  400.       and VMS makes the command line available to the program.
  401.     If the link bombs out I recommend trying it again like the following:
  402.         $ @make clean
  403.         $ @make
  404.     -allowroot only works if you have SYSPRV enabled which is a bit limiting.
  405.       Unless one uses the privileged install by a system manager.  To do
  406.       this, the following command needs to be executed at system startup
  407.       (i.e. included in systartup_vms.com):
  408.          INSTALL ADD {dev}:[{dir}]XLOCK.EXE/PRIV=(SYSPRV)
  409.       where {dev}:[{dir}] is the full path of the executable.
  410.     The XLock file normally in /usr/lib/X11/app-defaults needs to be in the
  411.       directory DECW$SYSTEM_DEFAULTS on VMS systems and be called
  412.       'DECW$XLOCK.DAT'.
  413.     USE_XLOCKRC, USE_AUTO_LOGOUT, USE_BUTTON_LOGOUT, & USE_MULTIPLE_ROOT
  414.       features are not implemented.
  415.     To use audio:
  416.       Set "sound" to be 1 in the make.com file.  Only available on the Alpha.
  417.       To get it work on a VAX some editing of the make.com is needed
  418.         (scan for USE_VMSPLAY)
  419.       The default sound files are hard coded to be in the current directory
  420.         see line 128 or so of the resource.c file but can be overruled from
  421.         the command line or the resourcefile decw$xlock.dat.
  422.       Sounds did not work for me on the VAX.
  423.       It should work OK on an AXP. (Due to a bug in the SO driver on some
  424.         models running VMS7.0, sounds are only available on the headset).
  425.     To use new event loop:
  426.        For VMS7.0 and higher : new event loop is used by default.
  427.          You do not need to install extra software.
  428.        For VMS6.2 or lower :
  429.          You need some UNIX utilities installed (XVMSUTILS).  See where to get
  430.          it below.
  431.          Look at the make.com and xvmsutil stuff.
  432.  
  433.   XFree86
  434.     Control-Alt-Backspace will defeat locking mechanism and return your
  435.       console back unless you put "DontZap" in your XF86Config file.
  436.       (In X11R5, that would be a "dontzap" in your Xconfig file).
  437.     Control-Alt-F1 (among others) will defeat locking mechanism with
  438.       virtual terminals. This is not too good, right?  If you are using
  439.       Linux, try vlock on tsx-11.mit.edu in /pub/linux/sources/usr.bin .
  440.       The current XFree86 (as far as I know) does not have a server
  441.       extension for catching or disabling VT switching.
  442.     Here is a work around, put this line in /etc/profile:
  443.         alias x='(startx >/dev/null &);clear;logout'
  444.       then use 'x' instead of 'startx' (with no other active VT's).
  445.  
  446.   XPM
  447.     Full color pixmap package.  See below on availability.  Follow its
  448.       instructions and then go to iconfig.h and uncomment (should be
  449.       autodetected if you use configure)
  450. XCOMM #define XpmLibrary
  451.  
  452.   X-Terminal
  453.     (My heart bleeds for you.)
  454.     To get xlock to run, run with -remote option or set XLock.remote on
  455.     in XLock.ad .  You might have to use -allowaccess as well.
  456.         
  457.   tvtwm
  458.     One used to get following error when running xlock (+nolock) with
  459.       tvtwm.
  460.     X Error of failed request:  BadWindow (invalid Window parameter)
  461.     What happens is that RootWindow(dsp, screen) fails when tvtwm is
  462.       running.  There is a kludge fix, but multiscreens will not work
  463.       right with tvtwm and xlock. (grep on TVTWM in xlock.c).
  464.     Another option, don't compile with -DUSE_VROOT .  If you debug it
  465.       mail ME -OR- both the author of tvtwm and ME the patch. 
  466.     StickyAbove problems:
  467.       Windows in a tvtwm that have "StickyAbove" set to true are still
  468.       visible when xlock (+inroot) is running. If this bothers you,
  469.       don't compile with -DUSE_VROOT .  Is it possible to have xlock
  470.       set "StickyAbove" to true as well? 
  471.  
  472.   fvwm
  473.     -install does not install colormaps.  fvwm will not allow an
  474.     application to install its own colormap.  You could always edit the
  475.     source if you have it, (fvwm-1.24r)colormaps.c, where it says 
  476.  if(ReInstall)
  477.    {
  478.      XInstallColormap(dpy,last_cmap);
  479.    }
  480.     make sure this does not happen.
  481.  
  482.   swirl (and tube) mode
  483.     Use with -install to see colormap change.
  484.     See "fvwm" if applicable.
  485.     "swirl" cycles its colors, except black and white.
  486.     This is easily seen when on a color monitor one enters:
  487.        ./xlock -mode swirl -inwindow -install
  488.     now move the mouse in the window.
  489.     If you find this annoying compile swirl.c with -DFORCEFIXEDCOLORS.
  490.     I hear it LOCKS UP on i386BsdArchitecture and tvtwm.
  491.     With twm (and fvwm see above) the colormap does not change.
  492.  
  493.   SafeWord
  494.     Edit config.h.in ... uncomment SAFEWORD line near bottom.
  495.     In modes/Makefile.in make sure SAFEWORD is linked in, comment out
  496.       similar link that does not contain safeword libraries.
  497.     Put the cust*.h files in the main xlock directory.
  498.     Use configure, make.
  499.     Get back to me if it works or does not work.
  500.      
  501.   Dynamic Linking
  502.     Hacked in but not currently working.
  503.     How to use elf on the sun with gcc and Gnu's make
  504.       Put this in iconfig.h
  505. #define Modules
  506.       xmkmf -a
  507.       Edit Makefile(s)
  508.         edit out all "-z text -M mapfile"
  509.         edit out change "ccs" to "local" so that the "make" path is to
  510.            Gnu's "make".
  511.         make
  512.         make install
  513.       Also added some stuff to configure but it is working less then xmkmf.
  514.       This patch was originally written for Linux.  Not all distributions
  515.       have "dlfcn.h" which is needed.  It may work better on Linux.
  516.       xlock core dumps right away... gdb gives 
  517.         Program received signal SIGSEGV, Segmentation fault.
  518.         0x40002d2b in _dl_debug_state ()
  519.  
  520.  
  521. Personal Use
  522. ------------
  523.   You may want to compile with USE_XLOCKRC .  xlock will then prompt
  524.   you the first time you use it for a password.  It is then encrypted
  525.   and stored in your $HOME/.xlockrc file.  This is also good for
  526.   users who have an unrecognized shadow password environment.  See
  527.   iconfig.h file (xmkmf) or `configure --help` for an example.
  528.   Please note that it may be rude to use xlock in a lab environment.
  529.  
  530. Lab Environment
  531. ---------------
  532.   The auto logout feature, when enabled, will log out a user after
  533.   30 minutes (by default).  The timeout can be changed or disabled
  534.   with a command-line option (or x resource -- this is allowed because
  535.   the logout button can always be used; see below).  The time
  536.   remaining before auto-logout is displayed on the password entry
  537.   screen.
  538.  
  539.   The logout button, when enabled, is a button that appears on the
  540.   password entry screen after 5 minutes (configurable at
  541.   compile-time) that, when clicked, logs out the user.  The rationale
  542.   for this thing is that in a lab environment, we wanted a way for
  543.   users to be able to reliably lock their display for short periods
  544.   of time, but still be allowed to have the display locked for longer
  545.   than that if the lab isn't busy.  If the lab IS busy, and there is
  546.   a need for workstations, the logout button can be used to logout
  547.   someone who's been gone for more than 5 minutes.
  548.  
  549.   Of course, the auto-logout and the logout button are
  550.   enabled/disabled by compile-time defines.  All these are OFF by
  551.   default.  One can also force use these features with a local policy
  552.   of exemptions (e.g. username or group). See the iconfig.h file or
  553.   `configure --help` for an example.  Edit your /etc/xlock.staff
  554.   file to reflect your policy.  If using xdm, you may just want to use
  555.   -DCLOSEDOWN_LOGOUT (or -DSESSION_LOGOUT <- old way) in conjuction
  556.   with -DUSE_AUTO_LOGOUT or -DUSE_BUTTON_LOGOUT.  That way all
  557.   backgrounded processes owned by a user do not have to be killed.
  558.  
  559.   Don't PANIC, the auto-logout and the logout button will not run if
  560.   you are root.  Otherwise, it will kill all of root's processes, not
  561.   a good idea.  As long as you do not lock the screen (using -nolock,
  562.   -inwindow, or -inroot) the policy of xlock users does not go into
  563.   effect.
  564.  
  565.  
  566. xlock still does not work:  :-(
  567. -------------------------------
  568.   If all that does not work you may need to adjust xlock.h, passwd.c
  569.   xlock.c, and resource.c since these files are highly implementation
  570.   dependent.  If you have to make this kind of change to get it working,
  571.   let me know.
  572.  
  573.   You can try compiling with -g and running it with -debug and your
  574.   favorite debugger, so xlock will run in a more friendly way (i.e. it
  575.   does not lock the screen).  There are also may be compile time switches
  576.   that could be turned on with -DDEBUG depending on what is not working
  577.   correctly.
  578.  
  579.   Here is a simple recipe:
  580.     Make sure the 12th line in the iconfig.h is a comment
  581.       (This is because the debug library for xpm is not usually installed)
  582. XCOMM #define XpmLibrary
  583.     xmkmf  <or configure --without-xpm>
  584.     edit Makefile  on the line with CC = gcc or or CC = cc change to
  585.                CC = gcc -g -DDEBUG
  586.     make depend <but not if using configure>
  587.     make
  588.     gdb xlock  (xdb or dbx xlock may work too.)
  589.     run -debug <other xlock options you want here>
  590.     where
  591.     print <relevant variables>
  592.       (you may have to use "up" to take you to xlockmore code)>
  593.     Mail me the results.
  594.  
  595.   If xlock crashes for you when in random mode... try this and mail
  596.     me the results.  (If it runs for a long time partial result will do
  597.     (gut the middle part)).
  598.   xlock -mode random -modelist all +install -debug -verbose
  599.     -modelist all: all modes except blank
  600.     -debug: so it does not lock the screen.
  601.     -verbose: for maximum verbosity.
  602.     +install: so it does not keep changing the colormap
  603.  
  604.  
  605. Other things to try: (if you got it working :-) )
  606. -------------------------------------------------
  607.  
  608.   Check out etc directory for menus and other goodies.
  609.  
  610.   If you like to check out what xlock looks like on multiscreens and you
  611.     do not have them... but do have Linux and Xnest ... try:
  612.      Xnest -scrns 3 :1 &
  613.      xterm -display :1.0
  614.     And run xlock from the created xterm.
  615.     If you are using MesaGL, it must be compiled without SHM extension do
  616.       to a bug in Xnest (even in XFree3.3 == X11R6.3) or you will get
  617.       "BadDrawable (invalid Pixmap or Window parameter)".
  618.  
  619.   You may want to change the 1st line of XLock.ad "random" to "blank",
  620.   "life", or whatever your favorite is and copy it to
  621.   /usr/lib/X11/app-defaults or $HOME (or wherever your application
  622.   defaults files are) and rename to XLock .
  623.  
  624.   You may want some of the modes never to come up in random.  This is
  625.   already hard coded for the blank mode.  See xlock man page on "modelist".
  626.   In mode.c you can hard code others by just putting the stuff that you do
  627.   not like in the LockProcs to the end of the static array and in
  628.   random.c increase NUMSPECIAL by the number of new screens that you do
  629.   not want displayed.
  630.  
  631.   You may want to move xlock into /usr/bin/X11 (or wherever your X
  632.   binaries are). You may also want to move xlock.man to
  633.   /usr/man/man1/xlock.1 .
  634.  
  635.   If you want to remove some unwanted modes just edit "mode.h" and
  636.   "mode.c" grep the for the unwanted modes.  You might want to edit
  637.   the man page and your favorite make file as well.
  638.  
  639.   I am very interested in cellular automata.  I am always looking to
  640.   improve ant, life, life3d, and life1d.  If anyone knows any new
  641.   collections (I have lifep.zip (May 94) and xlife 3.0) let me know.  If
  642.   you would like further information let me know.  There are several
  643.   run-time options to check out, see docs/cell_automata.
  644.  
  645.   Still like xscreensaver better?  (Obscenities omitted ;) ) Try
  646.   setting your apps-defaults file for xscreensaver like:
  647. *programs:      xlock -nolock +grabmouse -mode random
  648.  
  649.   If you want to hack a new mode check out docs/HACKERS.GUIDE.  Then
  650.   when working, just mail it to me, grep on "Maintainer" for the
  651.   address.
  652.  
  653.  
  654. Other related stuff (all not maintained by me):
  655. --------------------------------------------------------------------
  656.   NAME
  657.    LOCATION (last seen at)
  658.    DESCRIPTION
  659.  =============
  660.   audio/VMS
  661.     http://axp616.gsi.de:8080/www/vms/mzsw.html
  662.   fortune
  663.     ftp://igor.girton.cam.ac.uk/pub/funny/cookie.tgz 
  664.     ftp://ftp.uu.net/systems/unix/BSD/games/fortune
  665.     ftp://ftp.sterling.com/usenet/alt.sources/index (grep for cookie)
  666.     Please note that my format is slightly different.  The number at the
  667.       top of the file should match `grep -c "^%%$" fortune.dat`
  668.   imake
  669.     ftp://hpux.csc.liv.ac.uk/hpux/X11/Core/imake-5.06/imake-5.06-ss-9.03.tar.gz
  670.     I had to worry about FIXUP_CPP_WHITESPACE.
  671.   Lesstif
  672.     ftp://ftp.hungry.com/pub/hungry/lesstif/lesstif-current.tar.gz
  673.     Lesstif Library (just like Motif)
  674.   Man2HTML
  675.     ftp://sunsite.unc.edu/pub/Linux/system/Manual-pagers/vh-man2html-1.4.tar.gz
  676.   MesaGL
  677.     ftp://iris.ssec.wisc.edu/pub/Mesa
  678.     Mesa 3-D Graphics Library (like GL) Mesa-2.3 or greater required.
  679.     Mesa-2.2 and below has some memory leaks.
  680.   NAS (audio package)
  681.     ftp://ftp.x.org/contrib/audio/nas
  682.   rplay (audio package)
  683.     ftp://ftp.x.org/contrib/audio/rplay
  684.   sx
  685.     Use with Athena.
  686.     ftp://sunsite.unc.edu/pub/Linux/X11/devel/librairies/clibs/libsx.tar.gz
  687.   UNIX/VMS
  688.     Unix-like routines XVMSUTILS can be found at
  689.       http://axp616.gsi.de:8080/www/vms/mzsw.html
  690.   xautolock (runs xlock after a idle time)
  691.     ftp://ftp.x.org/contrib/applications
  692.     (I use openwin and I put this in my $HOME/.openwin-init)
  693.     toolwait /usr/local/bin/xautolock -time 5 -locker "xlock -lockdelay 30"
  694.   XPM
  695.     ftp://ftp.x.org/contrib/libraries
  696.     color pixmaps
  697.   XPM/VMS
  698.     use the one above or xlock may bomb out,
  699.     compile with cc/standard=vaxc/define=(need_strcasecmp,need_strdup)
  700.       except when using XVMSUTILS.
  701.   xscreensaver
  702.     ftp://ftp.x.org/contrib/applications
  703.     http://www.jwz.org/xscreensaver
  704.  
  705.  
  706. Operation: (Blurb taken from Darren Senn's xlock)
  707. ------------------------------------------------- 
  708.  
  709.   Under X, run xlock.  The screen will clear, and some pretty animated
  710.   picture (exactly which depends on which module is active) will appear
  711.   on the screen.  If you hit a key, then the screen will clear, and
  712.   (unless you've changed the application defaults file that I packaged
  713.   with this) you'll get a black screen with some graphics in the top
  714.   center.  These graphics consist of a reduced size image of the module
  715.   you were viewing, the name of the user who executed xlock, and
  716.   password prompt field, and some short instructions.
  717.  
  718.   At this point, you can either click on the graphic to return to xlock,
  719.   or you can type a password.  If the password is verifiable as the
  720.   root password, or the password of the user listed above, then xlock
  721.   will terminate.  THIS IS THE ONLY WAY TO STOP XLOCK WITHOUT SHUTTING
  722.   DOWN THE X SERVER.  That's what makes it a lock.
  723.  
  724.  
  725. Resources: (Also taken from Darren Senn's xlock)
  726. ------------------------------------------------
  727.  
  728.   There are two sets of resources for XLock.  The first set are (what I
  729.   call) global XLock resources, while the second set consists of
  730.   module-specific resources.
  731.  
  732.   The global resources are:
  733.         XLock.mode: This sets the module.
  734.         XLock.font: This is the font used on the password entry screen.
  735.         XLock.background: The background color for the password entry screen.
  736.         XLock.foreground: The foreground color for the password entry screen.
  737.         XLock.username: The label for the field indicating the user name.
  738.         XLock.password: The label for the password prompt.
  739.         XLock.info: The "short instructions" to print.
  740.         XLock.validate: A message to display while checking the password
  741.         XLock.invalid: A message to display if the password is incorrect
  742.         XLock.nice: How much XLock should nice itself.
  743.         XLock.timeout: How long to wait idle at the password prompt.
  744.         XLock.timeelapsed: Message to see how long lock running (yes or no)
  745.         XLock.mono: Monochrome mode (yes or no)
  746.         XLock.nolock: disable the lock mechanism (yes or no)
  747.         XLock.remote: allow remote locking (meaningless under linux)
  748.         XLock.allowroot: allow the root password to unlock (yes or no)
  749.         XLock.enablesaver: allow the system screensaver to work (yes or no)
  750.         XLock.allowaccess: allow other clients to connect while active
  751.         XLock.echokeys: Echo "?" for each password keypress (yes or no)
  752.         XLock.usefirst: Ignore the first character typed (yes or no)
  753.         XLock.verbose: Verbose mode. (yes or no)
  754.         XLock.inwindow: allow the xlock to run in a window (yes or no)
  755.         XLock.inroot: allow the xlock to run in the root window (yes or no)
  756.         XLock.grabmouse: Grab the keyboard and mouse (yes or no)
  757.  
  758.   XLock has a number of modules which it can display.  (See the man page
  759.   for a complete list).  It turns out that each module is characterized
  760.   by a number of initializations, separated by a number of "draws".
  761.   Each module has the following resources defined:
  762.  
  763.         XLock.<module>.delay: How long to wait between draws (usec)
  764.         XLock.<module>.batchcount: May mean various things (see man page).
  765.         XLock.<module>.cycles: Controls the timeout of screen (see man page).
  766.         XLock.<module>.size: Controls size of objects on screen (see man page).
  767.         XLock.<module>.saturation: Saturation (as in HSV) of colors to use.
  768.  
  769.  
  770. Acknowledgments:
  771. ----------------
  772.  
  773.   I did not write the original algorithms in any of the lock screens
  774.   (except wator, bug, life1d, demon, ant, daisy, and voters), although I
  775.   did convert many of the new ones to run with xlock.  I tried to follow
  776.   the original style of Patrick Naughton.  Updates are made at
  777.   ftp.x.org in directory /contrib/applications.  Many of the additions
  778.   were "borrowed" from xscreensaver (Jamie Zawinski <jwz@jwz.org>).
  779.   Some of the others were "borrowed" from old demos from Sun.  Many more
  780.   are contributions.
  781.  
  782.   I will consider putting new ones in if (1) they are more or less public
  783.   domain (i.e. BSD, sorry no GNU copyrights), (2) they are neat (I am
  784.   biased towards mathematically based programs (especially the Computer
  785.   Recreations of Scientific American)), and (3) I have the time.
  786.  
  787.   Also many thanks to the people that helped me countless times with 
  788.   xlock mentioned in "Revisions", especially Jouk Jansen, Tom Schmidt,
  789.   David Hansen, Ed Mackey, Marcelo Vianna, Ron Hitchens, and Heath Kehoe.
  790.  
  791.